<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
  <ui:define name="body">
  	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
  <h1 class="title ui-widget-header ui-corner-all"> Generar Horarios de vendedores</h1>
  <h:form id="horarioVendedor">
<p:growl id="messages" showDetail="true" />
		<p:fieldset legend="Generar horario" style="margin-top:30px; width:50%">
			<h:panelGrid columns="2" id="panel" cellpadding="6" >
			
			<p:selectOneMenu value="#{horarioVendedorForm.idPunto}">
				<f:selectItems value="#{comboAction.almacenItems}" />
			</p:selectOneMenu>
			
			<p:commandButton value="Generar Horario" action="#{horarioVendedorForm.generarHorario}" update="@form" />
			
			</h:panelGrid>
		</p:fieldset>
		<br />
		<br />	
		<br />
    <p:schedule value="#{horarioVendedorForm.eventModel}" draggable="false" resizable="false"  locale="pe" >
     <p:ajax event="dateSelect" listener="#{horarioVendedorForm.onDateSelect}" update=":formHorarioVendedor:display,messages" /> 
     <p:ajax event="eventSelect" listener="#{horarioVendedorForm.onEventSelect}" update=":formHorarioVendedor:display" oncomplete="horarioVendedorDialog.show()" />
    </p:schedule>
    
	</h:form>
</ui:define>
</ui:composition>